﻿-- =============================================
-- Author:		<赵洪涛>
-- Create date: <2012-02-16>
-- Description:	<获取重复的客户名称数量(新客户审核)>
-- =============================================
CREATE PROCEDURE [dbo].[proc_Customer_ReptCusNameCount]
(
	@CusName nvarchar(100),
	@CusId varchar(60),
	@CompanyId int
)
AS
BEGIN
	Declare @cSql nvarchar(2000)

	Set @cSql = 'Select Count(0) As shl From Customer
	Where CompanyId='+Convert(varchar(10),@CompanyId)+' And Audit=1
	And CustomerName Like ''%'+@CusName+'%'''

	Exec(@cSql)
END